<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!-- 小包客户价格类型  -->
<script>
function synchronousChannel(kid){
	alertMsg.confirm("确定同步，同步所有数据会重置！", {
		okCall: function(){
			var bp = '<%=basePath%>'+'synchronousChannel';			
			$.post(bp,{"airMailPriceKindId":kid},function(msg){
				alertMsg.correct('同步成功！');	
			});
		}
	});
}
</script>


<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
-->
<div class="pageHeader">
<%--	<form method="post" onsubmit="return validateCallback(this,navTabAjaxDone)" action="<%=basePath%>addAirMailKind"--%>
<%--		method="post">--%>
<%--	<ul class="toolBar">--%>
<%--			<li> --%>
<%--				添加分类：分类名--%>
<%--				<input type="text" name="airMailPriceKindName" id="airMailPriceKindName" value="" class="required"/>--%>
<%--				备注--%>
<%--				<input type="text" name="airMailPriceKindNote" id="airMailPriceKindNote" value="" class="required"/>--%>
<%--				<input type="submit" value="添加分类"/>--%>
<%--			</li>--%>
<%--		</ul>--%>
<%--	</form>--%>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li>
				<a class="edit" id="batchUpdate" posttype="string"  href="<%=basePath%>backgroundManager/pricemanager/airMailPrice/airMailPriceKindAdd.jsp"
				 posttype="string" target="navTab"
			    rel="customerIds" ><span>添加小包价格分类</span></a>
			</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				<th width="10%">序号</th>
				<th width="20%">名称</th>
				<th width="10%">添加时间</th>
				<th >备注</th>
				<th width="30%">操作</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="airMailPriceKindList" var="dd" status="sta"> 
				<tr>
					<td><s:property value="#sta.count"/></td>
					<td><s:property value="#dd[1]"/></td>
					<td><s:date name="#dd[2]" format="yyyy-MM-dd" /></td>
					<td><s:property value="#dd[3]"/></td>
					<td>
						<a style="color: red;" href="<%=basePath%>findAirMailChannel?airMailPriceKindId=<s:property value="#dd[0]"/>&airMailPriceKindName=<s:property value="#dd[1]"/>"  title="查看渠道并设置价格系数" target="navTab" rel="airMailPriceKindChannelPage" fresh="true">查看拥有渠道</a>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a style="color: red;" href="javascript:void(0);" onclick="synchronousChannel(<s:property value="#dd[0]"/>);" title="将新添加的渠道同步到该分类">同步新添加渠道</a>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a style="color: red;" href="<%=basePath%>findClinentCustomers?airMailPriceKindName=<s:property value="#dd[1]"/>&pageNum=1&numPerPage=20&airMailPriceKindId=<s:property value="#dd[0]"/>" target="navTab" width="800" height="400" mask="true" fresh="true" title="所属分类： <s:property value="#dd[1]"/>">客户绑定</a>
					</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
</div>
